<div class="row">
  <div class="col-md-12">
    <div class="panel panel-default">
      <div class="panel panel-heading">
        <h1 class="panel-title">
          用户列表
        </h1>
      </div>
      <div class="panel panel-body">
        <div ng-show="roles.length==0">暂时没有数据</div>
        <table class="table table-hover table-striped table-bordered" ng-hide="roles.length==0">
          <thead>
          <tr>
            <th>ID</th>
            <th>用户名</th>
            <th>姓名</th>
            <th>密码</th>
            <th>性别</th>
            <th>邮箱</th>
            <th>权限</th>
            <th>操作</th>
          </tr>
          </thead>
          <tbody>
          <tr ng-repeat="user in users">
            <td>{{user.id}}</td>
            <td>{{user.username}}</td>
            <td>{{user.name}}</td>
            <td>{{user.password}}</td>
            <!--<td>{{user.sex==1?'男':'女'}}</td>-->
            <td>{{user.sex==1 | sexFilter}}</td>
            <td>{{user.email}}</td>
            <td>{{user.roleName}}</td>
            <td>
              <button class="btn btn-primary btn-sm" ui-sref="app.userEdit({id:user.id})">修改</button>
              <button class="btn btn-primary btn-sm" ng-click="deleteUser(user.id,user.name)">删除</button>
            </td>
          </tr>
          </tbody>
        </table>

      </div>
      <div class="panel-footer">
        <button class="btn btn-success" ui-sref="app.userEdit">添加用户</button>
        <button class="btn btn-info" ui-sref="app.home">返回首页</button>
      </div>
    </div>
  </div>
</div>
